.organization-container {
  width: 100%;
  min-height: 100vh;
  background: #F2F2F6;
  overflow-x: hidden;
  // padding-bottom: 100px;
}

/* 组织架构骨架屏容器样式 */
.org-skeleton {
  padding: 20px;
}

// 顶部导航区域背景
.header-wrapper {
  width: 750px;
  height: 284px;
  background: #3F99F9;
  border-radius: 0px 0px 0px 0px;
  position: relative;
  margin: 0 auto;
}

// 顶部导航
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 44px 40px 20px 20px;
  background: transparent;
  position: relative;

  .back-icon {
    width: 60px;
    height: 60px;
    font-size: 60px;
    color: #FFFFFF;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .header-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 324px;
    height: 54px;
    font-family: 'Source Han Sans CN', 'Source Han Sans CN';
    font-weight: 500;
    font-size: 36px;
    color: #FFFFFF;
    text-align: center;
    font-style: normal;
    text-transform: none;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

// 搜索框
.search-container {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  width: 670px;
  height: 70px;
  background: #FFFFFF;
  border-radius: 10px 10px 10px 10px;
  display: flex;
  align-items: center;

  :deep(.van-search) {
    padding: 0;
    background: transparent;
    width: 100%;
    height: 100%;

    .van-search__content {
      background: transparent;
      border: none;
      border-radius: 0;
      height: 100%;
      display: flex;
      align-items: center;
      padding: 24px 0 23px 36px;

      // 解决不同分辨率下文字显示问题
      .van-cell--borderless {
        height: auto;
      }

      .van-search__field {
        height: auto;
      }

      .van-field__control {
        font-family: 'Source Han Sans CN', 'Source Han Sans CN';
        font-weight: 500;
        font-size: 28px;
        color: #333;
        text-align: left;
        font-style: normal;
        text-transform: none;
        background: transparent;
        border: none;
        height: auto;

        &::placeholder {
          font-family: 'Source Han Sans CN', 'Source Han Sans CN';
          font-weight: 500;
          font-size: 28px;
          color: #97999C;
          text-align: left;
          font-style: normal;
          text-transform: none;
        }
      }
    }

    .van-search__action {
      display: none;
    }

    .van-field__left-icon {
      width: 23px;
      height: 23px;
      background: transparent;
      border-radius: 0;
      margin-right: 15px;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;

      .van-icon {
        font-size: 28px;
        color: #97999C;
      }
    }
  }
}

// 面包屑导航
.breadcrumb {
  display: flex;
  align-items: center;
  // padding: 15px 20px;
  padding-left: 40px;
  padding-top: 15px;
  padding-bottom: 22px;
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
  box-shadow: 0px 4px 15px 0px rgba(0, 0, 0, 0.05);
  font-size: 30px;
  font-weight: 500;
  color: #9999;
  margin-bottom: 20px;
  // .breadcrumb-item {

  //   &.current {
  //     // color: #333;
  //     // font-weight: 500;
  //   }
  // }

  .breadcrumb-arrow {
    font-size: 38px;
    // color: #999;
    margin: 0 8px;
  }
}

// 老板信息区域
.boss-info {
  background: #fff;
  // margin-top: 10px;
  // 只保留下方阴影，减小模糊半径并增加y轴偏移
  box-shadow: 0px 8px 10px -4px rgba(0, 0, 0, 0.05);
  
  // 当没有部门数据时添加顶部间距
  // &.no-departments {
  //   padding-top: 22px;
  // }
  .boss-item {
    display: flex;
    align-items: center;
    padding: 22px 30px 26px 40px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    &:active {
      background-color: #f5f5f5;
    }

    .boss-avatar {
      width: 76px;
      height: 76px;

      border-radius: 20px 20px 20px 20px;
      margin-right: 17px;

      img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        border-radius: 20px 20px 20px 20px;
      }
    }

    .boss-details {
      flex: 1;

      .boss-name {
        display: flex;
        align-items: center;
        font-family: 'Source Han Sans CN';
        font-weight: 400;
        font-size: 32px;
        color: #333;
        margin-bottom: 6px;
        // line-height: 32px;

        .manager-tag {
          color: #3FC43A;
          font-size: 20px;
          padding: 4px 8px;
          border-radius: 6px 6px 6px 6px;
          border: 1px solid #3FC43A;
          // border-radius: 10px;
          margin-left: 12px;
          font-weight: 400;
        }

        .admin-tag {
          // background: #1890ff;
          border-radius: 6px 6px 6px 6px;
          border: 1px solid #2D67B0;
          color: #2D67B0;
          font-size: 20px;
          padding: 4px 8px;
          margin-left: 8px;
          font-weight: 400;
        }
      }

      .boss-position {
        font-family: 'Source Han Sans CN';
        font-size: 22px;
        color: #666;
        // line-height: 20px;
        margin-bottom: 4px;
      }
      
      .boss-phone {
        font-family: 'Source Han Sans CN';
        font-size: 22px;
        color: #666;
        // line-height: 20px;
      }
    }

    .edit-icon {
      width: 38px;
      height: 38px;
      cursor: pointer;
      transition: opacity 0.3s ease;
      
      &.disabled {
        opacity: 0.3;
        cursor: not-allowed;
        pointer-events: none;
      }
    }
  }
}

// 部门和成员列表
.department-list {
  background: #fff;
  // margin-top: 20px;
}

// 部门项
.department-item {
  display: flex;
  align-items: center;

  padding: 0 30px 32px 40px;
  cursor: pointer;
  transition: background-color 0.2s;

  &:first-child {
    padding-top: 22px;
  }

  &:active {
    background-color: #f5f5f5;
  }

  .department-icon {
    width: 76px;
    height: 76px;
    background: #CCECFF;
    border-radius: 20px 20px 20px 20px;
    margin-right: 17px;

    img {
      width: 100%;
      height: 100%;
      object-fit: contain;
    }
  }

  .department-info {
    flex: 1;

    .department-name {
      font-weight: 400;
      font-size: 32px;
      color: #333333;
      letter-spacing: 1px;
      text-align: left;
      font-style: normal;
      text-transform: none;
    }

    .department-desc {
      font-family: 'Source Han Sans CN';
      font-size: 14px;
      color: #666;
      // line-height: 20px;
    }
  }

  .arrow-icon {
    font-size: 38px;
    color: #999;
  }
}



// 底部操作按钮
.bottom-actions {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  background: #fff;
  border-top: 1px solid #f0f0f0;
  padding: 0;
  box-shadow: 0px 4px 15px 0px rgba(0, 0, 0, 0.05);
  z-index: 9999;
  min-height: 83px;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  .action-buttons {
    display: flex;

    .action-btn {
      flex: 1;
      height: 83px;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      // transition: background-color 0.2s;
      position: relative;

      &:not(:last-child)::after {
        content: '';
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 1px;
        height: 40px;
        background-color: #E0E0E0;
      }

      &:active {
        background-color: #f5f5f5;
      }

      span {
        font-family: 'PingFang SC';
        font-weight: bold;
        font-size: 28px;
        color: #2D67B0;
        text-align: center;
      }
    }
  }
}

// 为底部按钮预留空间
// .department-list {
//   padding-bottom: 100px;
// }

// 加载状态样式
.loading-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 60px 0;
  
  .van-loading {
    font-size: 28px;
    color: #666;
  }
}

// 空状态样式
.empty-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 60px 0;
  
  .van-empty {
    font-size: 28px;
    color: #999;
  }
}

// 用户列表区域
.user-list {
  background: #fff;
  margin-top: 20px;
  box-shadow: 0px 8px 10px -4px rgba(0, 0, 0, 0.05);
  
  .user-list-title {
    padding: 22px 40px 16px 40px;
    font-family: 'Source Han Sans CN';
    font-weight: 500;
    font-size: 30px;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
  }
  
  .user-item {
    display: flex;
    align-items: center;
    padding: 22px 30px 22px 40px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.2s;
    
    &:last-child {
      border-bottom: none;
    }
    
    &:active {
      background-color: #f5f5f5;
    }
    
    .user-avatar {
      width: 76px;
      height: 76px;
      background: #CCECFF;
      border-radius: 20px;
      margin-right: 17px;
      
      img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        border-radius: 20px;
      }
    }
    
    .user-details {
      flex: 1;
      
      .user-name {
        display: flex;
        align-items: center;
        font-family: 'Source Han Sans CN';
        font-weight: 400;
        font-size: 32px;
        color: #333;
        margin-bottom: 6px;
        // line-height: 32px;
        .admin-tag {
          // background: #1890ff;
          border-radius: 6px 6px 6px 6px;
          border: 1px solid #2D67B0;
          color: #2D67B0;
          font-size: 20px;
          padding: 4px 8px;
          margin-left: 8px;
          font-weight: 400;
        }
      }
      
      .user-phone {
        font-family: 'Source Han Sans CN';
        font-size: 22px;
        color: #666;
        // line-height: 20px;
        margin-bottom: 4px;
      }
    }
    
    .edit-icon {
      width: 38px;
      height: 38px;
      cursor: pointer;
      transition: opacity 0.3s ease;
      
      &.disabled {
        opacity: 0.3;
        cursor: not-allowed;
        pointer-events: none;
      }
    }
  }
}